package 线程.阻塞队列;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class Text {
    public static void main(String[] args) {
        //1.创建阻塞队列的对象
        ArrayBlockingQueue<String> queue=new ArrayBlockingQueue<>(1) ;

        //2.创建线程的对象
        Cook cook=new Cook(queue);
        Foodie foodie=new Foodie(queue);

        //3.开启线程
        cook.start();
        foodie.start();
    }
}
